<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Support\Facades\Auth;

class AuthToken
{
    public function handle($request, Closure $next)
    {
        if(Auth::check()){
            return $next($request);
        }else{
            return [
                'errorCode' => 401,
                'errorMsg' => '无权限操作'
            ];
        }
    }
}
